package com.google.guava.eventbus.test;

import com.google.guava.eventbus.internal.MyAsyncEventBus;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author fuc
 * @create 2020-10-08
 */
public class MyAsyncBusExample {

  public static void main(String[] args) {
    MyAsyncEventBus eventBus =
        new MyAsyncEventBus((ThreadPoolExecutor) Executors.newFixedThreadPool(4));
    eventBus.register(new MySimpleListener());
    eventBus.register(new MySimpleListener2());
    eventBus.post(123456, "test-topic");

  }
}
